<!DOCTYPE html>
<html>
<head><meta name="generator" content="Hexo 3.9.0">
  <meta charset="utf-8">
  

  
  <title>markdown基础语法 | 姚毅的小笔记</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="description" content="[toc] 一、认识markdownMarDown 是一种用来写作的轻量级【标记语言】，它用简洁的语法代替排版，二不像一般我们用的文字处理软件Word或Pages有大量的排版、字体设置。它是我们专心于码字，用【标记】语法，代替常见的排版格式。 二、文字给文字添加颜色*添加红色  效果：$\color{red}{red}$写法：$\color{red}{red}$  *添加绿色  效果：$\colo">
<meta property="og:type" content="article">
<meta property="og:title" content="markdown基础语法">
<meta property="og:url" content="http://vcomyaoyi.gitee.io/yaostaticblog/2019/09/13/markdown/markdown基础语法/index.html">
<meta property="og:site_name" content="姚毅的小笔记">
<meta property="og:description" content="[toc] 一、认识markdownMarDown 是一种用来写作的轻量级【标记语言】，它用简洁的语法代替排版，二不像一般我们用的文字处理软件Word或Pages有大量的排版、字体设置。它是我们专心于码字，用【标记】语法，代替常见的排版格式。 二、文字给文字添加颜色*添加红色  效果：$\color{red}{red}$写法：$\color{red}{red}$  *添加绿色  效果：$\colo">
<meta property="og:locale" content="zh">
<meta property="og:image" content="https://upload-images.jianshu.io/upload_images/5716070-69815896d7a0968a.jpeg?imageMogr2/auto-orient/strip%7CimageView2/2/w/240">
<meta property="og:image" content="http://upload-images.jianshu.io/upload_images/5256985-996d2f113d219267.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/140">
<meta property="og:updated_time" content="2019-09-13T08:38:11.661Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="markdown基础语法">
<meta name="twitter:description" content="[toc] 一、认识markdownMarDown 是一种用来写作的轻量级【标记语言】，它用简洁的语法代替排版，二不像一般我们用的文字处理软件Word或Pages有大量的排版、字体设置。它是我们专心于码字，用【标记】语法，代替常见的排版格式。 二、文字给文字添加颜色*添加红色  效果：$\color{red}{red}$写法：$\color{red}{red}$  *添加绿色  效果：$\colo">
<meta name="twitter:image" content="https://upload-images.jianshu.io/upload_images/5716070-69815896d7a0968a.jpeg?imageMogr2/auto-orient/strip%7CimageView2/2/w/240">
  
    <link rel="alternate" href="/yaostaticblog/atom.xml" title="姚毅的小笔记" type="application/atom+xml">
  
  
    <link rel="icon" href="/favicon.png">
  
  
    <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  
  <link rel="stylesheet" href="/yaostaticblog/css/style.css">
</head>
</html>
<body>
  <div id="container">
    <div id="wrap">
      <header id="header">
  <div id="banner"></div>
  <div id="header-outer" class="outer">
    <div id="header-title" class="inner">
      <h1 id="logo-wrap">
        <a href="/yaostaticblog/" id="logo">姚毅的小笔记</a>
      </h1>
      
        <h2 id="subtitle-wrap">
          <a href="/yaostaticblog/" id="subtitle">记录，学习，分享</a>
        </h2>
      
    </div>
    <div id="header-inner" class="inner">
      <nav id="main-nav">
        <a id="main-nav-toggle" class="nav-icon"></a>
        
          <a class="main-nav-link" href="/yaostaticblog/">Home</a>
        
          <a class="main-nav-link" href="/yaostaticblog/archives">Archives</a>
        
      </nav>
      <nav id="sub-nav">
        
          <a id="nav-rss-link" class="nav-icon" href="/yaostaticblog/atom.xml" title="RSS Feed"></a>
        
        <a id="nav-search-btn" class="nav-icon" title="Search"></a>
      </nav>
      <div id="search-form-wrap">
        <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" class="search-form-input" placeholder="Search"><button type="submit" class="search-form-submit">&#xF002;</button><input type="hidden" name="sitesearch" value="http://vcomyaoyi.gitee.io/yaostaticblog"></form>
      </div>
    </div>
  </div>
</header>
      <div class="outer">
        <section id="main"><article id="post-markdown/markdown基础语法" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/yaostaticblog/2019/09/13/markdown/markdown基础语法/" class="article-date">
  <time datetime="2019-09-12T16:00:00.000Z" itemprop="datePublished">2019-09-13</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/yaostaticblog/categories/markdown/">markdown</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 class="article-title" itemprop="name">
      markdown基础语法
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <p>[toc]</p>
<h1 id="一、认识markdown"><a href="#一、认识markdown" class="headerlink" title="一、认识markdown"></a>一、认识markdown</h1><p>MarDown 是一种用来写作的轻量级【标记语言】，它用简洁的语法代替排版，二不像一般我们用的文字处理软件Word或Pages有大量的排版、字体设置。它是我们专心于码字，用【标记】语法，代替常见的排版格式。</p>
<h1 id="二、文字"><a href="#二、文字" class="headerlink" title="二、文字"></a>二、文字</h1><h2 id="给文字添加颜色"><a href="#给文字添加颜色" class="headerlink" title="给文字添加颜色"></a>给文字添加颜色</h2><p>*添加红色</p>
<blockquote>
<p>效果：$\color{red}{red}$<br>写法：$\color{red}{red}$</p>
</blockquote>
<p>*添加绿色</p>
<blockquote>
<p>效果：$\color{green}{green}$<br>写法：$\color{green}{green}$</p>
</blockquote>
<p>*添加清漾青(支持更丰富的16进制颜色)</p>
<p>*为句子内的中文字符加颜色</p>
<h1 id="三、段落"><a href="#三、段落" class="headerlink" title="三、段落"></a>三、段落</h1><p>一个 MarDown段落是由一个或多个连续的文本行组成，它的前后要有一个以上的空行（快捷键：command+return）</p>
<h1 id="四、标题"><a href="#四、标题" class="headerlink" title="四、标题"></a>四、标题</h1><blockquote>
<h1 id="一级标题"><a href="#一级标题" class="headerlink" title="一级标题"></a>一级标题</h1><h2 id="二级标题"><a href="#二级标题" class="headerlink" title="二级标题"></a>二级标题</h2><h3 id="三级标题"><a href="#三级标题" class="headerlink" title="三级标题"></a>三级标题</h3><h4 id="四级标题"><a href="#四级标题" class="headerlink" title="四级标题"></a>四级标题</h4><h5 id="五级标题"><a href="#五级标题" class="headerlink" title="五级标题"></a>五级标题</h5></blockquote>
<h1 id="五、加粗、斜体、删除线"><a href="#五、加粗、斜体、删除线" class="headerlink" title="五、加粗、斜体、删除线"></a>五、加粗、斜体、删除线</h1><p><em>斜体</em> <strong>加粗</strong> <del>删除线</del></p>
<h1 id="六、列表"><a href="#六、列表" class="headerlink" title="六、列表"></a>六、列表</h1><h2 id="6-1-无序列表"><a href="#6-1-无序列表" class="headerlink" title="6.1 无序列表"></a>6.1 无序列表</h2><ul>
<li>北京</li>
<li>上海</li>
<li>南京</li>
<li>郑州</li>
</ul>
<ul>
<li>周一</li>
<li>周二</li>
<li>周三<h2 id="6-2-有序列表"><a href="#6-2-有序列表" class="headerlink" title="6.2 有序列表"></a>6.2 有序列表</h2></li>
</ul>
<ol>
<li>苹果</li>
<li>橘子</li>
<li>香蕉</li>
</ol>
<h1 id="七、引用"><a href="#七、引用" class="headerlink" title="七、引用"></a>七、引用</h1><h2 id="7-1直接在行首加-gt"><a href="#7-1直接在行首加-gt" class="headerlink" title="7.1直接在行首加&gt;"></a>7.1直接在行首加&gt;</h2><blockquote>
<p>其实作为一个程序员来说，我是不合格的<br>什么时候才能小有成就</p>
</blockquote>
<h2 id="7-2如何在行首显示-gt"><a href="#7-2如何在行首显示-gt" class="headerlink" title="7.2如何在行首显示&gt;"></a>7.2如何在行首显示&gt;</h2><blockquote>
<p>利用 <strong>\</strong> 反斜杠进行转义<br>例子：如下所示<br>&gt;</p>
</blockquote>
<h1 id="八、图片和链接"><a href="#八、图片和链接" class="headerlink" title="八、图片和链接"></a>八、图片和链接</h1><p><img src="https://upload-images.jianshu.io/upload_images/5716070-69815896d7a0968a.jpeg?imageMogr2/auto-orient/strip%7CimageView2/2/w/240" alt="妹子"></p>
<hr>
<h2 id="8-1-简书中如何设置图片大小"><a href="#8-1-简书中如何设置图片大小" class="headerlink" title="8.1 简书中如何设置图片大小"></a>8.1 简书中如何设置图片大小</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">![Snip20170622_1.png](http://upload-images.jianshu.io/upload_images/5256985-996d2f113d219267.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/240)</span><br></pre></td></tr></table></figure>

<p>1.上面的代码，是把图片直接拖拽到简书中，产生的<br>2.注意代码末尾的几个字符<strong>~/w/240</strong>。”<strong>w</strong>“是width宽度的意思，后面的240戴奥宽度的大小。只要把这个数字修改，就可以改变图片大小<br>3.比如，将<strong>~/w/240</strong>修改为~/w/1240，图像一下就变大了许多<br><img src="http://upload-images.jianshu.io/upload_images/5256985-996d2f113d219267.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/140" alt="Snip20170622_1.png"></p>
<h2 id="8-2-链接"><a href="#8-2-链接" class="headerlink" title="8.2 链接"></a>8.2 链接</h2><p>1.<a href="https://www.baidu.com" target="_blank" rel="noopener">链接描述-百度</a><br>2.<a href="https://www.baidu.com" target="_blank" rel="noopener">https://www.baidu.com</a></p>
<h1 id="九、表格"><a href="#九、表格" class="headerlink" title="九、表格"></a>九、表格</h1><table>
<thead>
<tr>
<th align="left">内容居左</th>
<th align="center">内容居中</th>
<th align="right">内容居右</th>
</tr>
</thead>
<tbody><tr>
<td align="left">A</td>
<td align="center">A</td>
<td align="right">A</td>
</tr>
<tr>
<td align="left">B</td>
<td align="center">B</td>
<td align="right">B</td>
</tr>
<tr>
<td align="left"># 十、代码引用</td>
<td align="center"></td>
<td align="right"></td>
</tr>
</tbody></table>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line">public int getVerticalScrollbarWidth() &#123;</span><br><span class="line">    ScrollabilityCache cache = mScrollCache;</span><br><span class="line">    if (cache != null) &#123;</span><br><span class="line">        ScrollBarDrawable scrollBar = cache.scrollBar;</span><br><span class="line">        if (scrollBar != null) &#123;</span><br><span class="line">            int size = scrollBar.getSize(true);</span><br><span class="line">            if (size &lt;= 0) &#123;</span><br><span class="line">                size = cache.scrollBarSize;</span><br><span class="line">            &#125;</span><br><span class="line">            return size;</span><br><span class="line">        &#125;</span><br><span class="line">        return 0;</span><br><span class="line">    &#125;</span><br><span class="line">    return 0;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<h1 id="十一、分割线"><a href="#十一、分割线" class="headerlink" title="十一、分割线"></a>十一、分割线</h1><hr>
<hr>
<h1 id="十二、缩进"><a href="#十二、缩进" class="headerlink" title="十二、缩进"></a>十二、缩进</h1><p>一般文章需要首行缩进两个中文字符</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">一个&amp;nbsp;代表一个空格，一般2个汉字，经过测试需要7个&amp;nbsp;</span><br></pre></td></tr></table></figure>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;中文</p>
<h1 id="十三、目录"><a href="#十三、目录" class="headerlink" title="十三、目录"></a>十三、目录</h1><p>直接在文章开始添加[toc]<br><strong>注意</strong>：简书无法实现此功能，想要有目录，请参考<a href="https://www.jianshu.com/p/3f07f8f6159f" target="_blank" rel="noopener">一步步教你简书左侧自动生成目录(Markdown)</a></p>
<h1 id="十四、数学公式"><a href="#十四、数学公式" class="headerlink" title="十四、数学公式"></a>十四、数学公式</h1><p><strong>…</strong></p>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://vcomyaoyi.gitee.io/yaostaticblog/2019/09/13/markdown/markdown基础语法/" data-id="ck2uj38qq0001ustcvgpvn56q" class="article-share-link">Share</a>
      
      
    </footer>
  </div>
  
    
<nav id="article-nav">
  
    <a href="/yaostaticblog/2019/09/13/heao/hello-world/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Newer</strong>
      <div class="article-nav-title">
        
          Hello World
        
      </div>
    </a>
  
  
    <a href="/yaostaticblog/2019/09/13/python/pythontest/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Older</strong>
      <div class="article-nav-title">Python编程例程</div>
    </a>
  
</nav>

  
</article>

</section>
        
          <aside id="sidebar">
  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Categories</h3>
    <div class="widget">
      <ul class="category-list"><li class="category-list-item"><a class="category-list-link" href="/yaostaticblog/categories/Python基础/">Python基础</a></li><li class="category-list-item"><a class="category-list-link" href="/yaostaticblog/categories/java/">java</a></li><li class="category-list-item"><a class="category-list-link" href="/yaostaticblog/categories/markdown/">markdown</a></li></ul>
    </div>
  </div>


  
    

  
    
  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Archives</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/yaostaticblog/archives/2019/11/">November 2019</a></li><li class="archive-list-item"><a class="archive-list-link" href="/yaostaticblog/archives/2019/09/">September 2019</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Recent Posts</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/yaostaticblog/2019/11/11/java/java基础/java基础/">java基础</a>
          </li>
        
          <li>
            <a href="/yaostaticblog/2019/09/13/heao/hello-world/">Hello World</a>
          </li>
        
          <li>
            <a href="/yaostaticblog/2019/09/13/markdown/markdown基础语法/">markdown基础语法</a>
          </li>
        
          <li>
            <a href="/yaostaticblog/2019/09/13/python/pythontest/">Python编程例程</a>
          </li>
        
      </ul>
    </div>
  </div>

  
</aside>
        
      </div>
      <footer id="footer">
  
  <div class="outer">
    <div id="footer-info" class="inner">
      &copy; 2019 姚毅<br>
      Powered by <a href="http://hexo.io/" target="_blank">Hexo</a>
    </div>
  </div>
</footer>
    </div>
    <nav id="mobile-nav">
  
    <a href="/yaostaticblog/" class="mobile-nav-link">Home</a>
  
    <a href="/yaostaticblog/archives" class="mobile-nav-link">Archives</a>
  
</nav>
    

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>


  <link rel="stylesheet" href="/yaostaticblog/fancybox/jquery.fancybox.css">
  <script src="/yaostaticblog/fancybox/jquery.fancybox.pack.js"></script>


<script src="/yaostaticblog/js/script.js"></script>



  </div>
</body>
</html>